package com.xc.round2Assessment.petStore;

import com.xc.round2Assessment.petStore.pojo.Customer;
import com.xc.round2Assessment.petStore.shop.MyAnimalShop;
import org.junit.jupiter.api.Test;

import java.time.LocalDate;

/**
 * @author Xc
 * @version 1.0
 */
public class Thinking {
    /**
     * 整理一下思路
     * 通过策略 + 门面 + 工厂, 写好了购买动物的支付接口
     * 然后接下来还要完善用户类 和 宠物商店类
     *
     *
     */
    public static void main(String[] args) {
        MyAnimalShop shop = new MyAnimalShop(1000);
        shop.buyAnimals(2);
        shop.buyAnimals(1);
        shop.buyAnimals(0);
        System.out.println(shop.getAccount());
        shop.showAnimals();
        System.out.println();
        Customer cus1 = new Customer("一号顾客", LocalDate.of(2022, 11, 8), 0);
        shop.treatCustom(cus1);

        // 测试歇业方法
        shop.close(cus1.getLastedArrTime());

    }

    @Test
    public void test() {
        double random = Math.random();
        System.out.println(random);
    }
}
